<?
require '../home/config.php';
$service = getValue('client_id','str','GET','',2);
$domain = getValue('domain','str','GET','',2);
if($service == '' || $domain == '')
   die('Vui lòng nhập domain và service');
   
$db_link = new db_query('SELECT lin_id FROM links WHERE lin_title = "'.$service.'" LIMIT 1');
$link = mysql_fetch_assoc($db_link->result);
if(isset($link)) {
   $continue = $domain.'/SudoOauth.php';
   $continue2 = $domain.'/wp-content/plugins/sudo-oauth/SudoOauth.php';
   $arr = array('service'=>$service,'continue'=>$continue);
   $arr =json_encode($arr);
   $arr = base64_encode($arr);
   $arr2 = array('service'=>$service,'continue'=>$continue2);
   $arr2 =json_encode($arr2);
   $arr2 = base64_encode($arr2);
   echo 'Xenforo: <b>http://id.sudo.vn/dang-nhap/oauth/xenforo?token='.$arr.'</b>';
   echo '<br /><br />';
   echo 'Wordpress: <b>http://id.sudo.vn/dang-nhap/oauth/wordpress?token='.$arr.'</b>';
   echo '<br /><br />';
   echo 'Wordpress v2: <b>http://id.sudo.vn/dang-nhap/oauth/wordpress?token='.$arr2.'</b>';
   die;
}


?>